﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ICAEXObject.cs" >
//   J. Prinz
// </copyright>
// <summary>
//   the ICAEXObject is the Interface of a CAEXObjectViewModel to a CAEXObject
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace AutomationMLMapper.ViewModels
{
    using System;
    using System.ComponentModel;

    using CAEX_ClassModel;

    /// <summary>
    ///   the ICAEXObject is the Interface for any CAEXObjectViewModel for any CAEXObject
    /// </summary>
    public interface ICAEXObject : INotifyPropertyChanged
    {
        #region Public Properties

        /// <summary>
        ///  Name Property
        /// </summary>
        string Name { get; set; }

        /// <summary>
        ///  Library of the CAEXObject
        ///  Every CAEXObject could be located in one Library only. The LibraryCaexObject could be an 
        ///  InstanceHierarchy, a SystemUnitClassLib, a RoleClassLib or an InterfaceClassLib
        /// </summary>
        CAEXBasicObject LibraryCaexObject { get; set; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// The AddElement Method is a Method in any CAEXObjectViewModel. This Method is used to build a 
        /// View Representation of the Childs of the CaexObject
        /// </summary>
        /// <param name="caexObjectType">
        /// The Type of the added Child
        /// </param>
        /// <returns>
        /// The AutomationMLMapper.ViewModels.ICAEXObject. 
        /// </returns>
        ICAEXObject AddElement(Type caexObjectType);

        /// <summary>
        ///   The viewed CaexObject in the CAEXObjectViewModel
        /// </summary>
        /// <returns> The CAEX_ClassModel.CAEXBasicObject. </returns>
        CAEXBasicObject GetCaexObject();

        /// <summary>
        ///   Method Definition which implements the load method for loading the CaexObject to the ViewModel
        /// </summary>
        void LoadCaexToRepresentationModel();

        #endregion
    }
}